package top.chmin.project.cloud.sys.dict.data;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import top.chmin.project.cloud.common.BindColumn;

import java.util.List;

/**
 * chmin
 * 2024/1/21 21:04
 * cloud-code
 */
public interface DictDataSelectListByType {

    @PostMapping("/cloud-common/dictData/selectListByType")
    List<R> selectListByType(@RequestBody P p);

    @Getter
    @Setter
    @Accessors(chain = true)
    class P {
        private String typeCode;
    }

    @Getter
    @Setter
    @Accessors(chain = true)
    class R {
        @BindColumn(DictDataColumn.typeValue)
        private String value;
        @BindColumn(DictDataColumn.typeLabel)
        private String label;
    }
}
